{{define "Title"}}Packing{{end}}
{{define "Content"}}

<script type=text/javascript src="/js/enterKey.js"></script>
<script type=text/javascript src="/js/datefmt.js"></script>
{{if eq .ProductionLine "SFPRD06"}}
  <script type=text/javascript src="/js/RFpackflow.js"></script>
{{else}}
  <script type=text/javascript src="/js/packflow.js"></script>
{{end}}

<div class="container-fluid">
<form class="form-horizontal" action="/scanflow" method="POST">
  <fieldset>
    <legend><b>Packing</b></legend>
    <div class="control-group">
      <label class="control-label">BoxID&nbsp;</label>
      <div class="control">
        <input type="text" class="input-large" id="boxinput" name="boxinput" style="font-weight: bold;background-color:#FFFFD0;text-transform:uppercase;" onkeydown="clicka();" maxlength="30"> <b style="color: red">*</b>
      </div>
    </div>
    <div class="control-group">
    {{if eq .ProductionLine "SFPRD06"}}
      <label class="control-label">BagID&nbsp;</label>
    {{else}}
      <label class="control-label">Base Qty&nbsp;</label>
    {{end}}
      <div class="control">
        <input type="text" class="input-large" id="baseqty" name="baseqty" style="font-weight: bold;background-color:#FFFFD0;" onkeydown="clicka();"> <b style="color: red">*</b>
      </div>
    </div>
    <div class="control-group">
      <label class="control-label">Packed Qty&nbsp;</label>
      <div class="control">
        <label class="control-label" id="packqty" name="packqty" style="font-weight: bold; font-size: 32px; color: #0000FF; text-align:left; padding-left:10px;">0</label>
      </div>
    </div>
    <div class="control-group">
      <label class="control-label">Line&nbsp;</label>
      <div class="control">
        <label class="control-label" id="line" name="line" style="font-weight: bold; text-align:left; padding-left:10px;">{{.line | html}}</label>
      </div>
    </div>
  </fieldset>
</form>
</div>

<span id=result style="font-size: 16px;"></span>
<br/>
<br/>
{{if eq .ProductionLine "SFPRD06"}}
  <label style="font-size: 14px; display:none"><b>Fail Code</b></label><select id="failcode" name="failcode" onkeydown="clicka();" onmousewheel="return false" style="display:none">
{{else}}
  <label style="font-size: 14px;"><b>Fail Code</b></label><select id="failcode" name="failcode" onkeydown="clicka();" onmousewheel="return false">
{{end}}
  <option value="">
  {{range .failcodes}}
    <option value="{{.Code | html}}">{{.Code | html}} | {{.Desc | html}}
  {{end}}
</select>
<label style="font-size: 14px;"><b>Product No.</b></label><input type=text name=ssn class="input-xlarge" style="font-weight: bold; text-transform:uppercase; background-color: #FFFFD0;" onkeydown="txtKeyDown();" maxlength="50"> <b style="color: red">*</b>
{{if ne .ProductionLine "SFPRD06"}}
  <input type=button id="frccls" value="Force Close" style="float:right;color:red;font-weight: bold;">
{{end}}

<input type=button id="btnpack" value="Packed" style="display:none">

<br/>
<textarea id="flowdetail" value="" style="background:transparent;border-style:none;color:blue;width:800px;height:180px;leading:100;line-height:1.5;overflow-y:hidden;" readonly></textarea>

{{end}}